package com.wetalk;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.Menu;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.wetalk.util.ImageUtil;

public class TalkActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_talk);
		LinearLayout meLayout = (LinearLayout)findViewById(R.id.me);
		LinearLayout peerLayout = (LinearLayout)findViewById(R.id.peer);
		ImageView meHeadIco = (ImageView)meLayout.findViewById(R.id.head_ico);
		TextView myName = (TextView)meLayout.findViewById(R.id.name);
		ImageView peerHeadIco = (ImageView)peerLayout.findViewById(R.id.head_ico);
		TextView peerName = (TextView)peerLayout.findViewById(R.id.name);
		Bitmap bitmap1 = BitmapFactory.decodeResource(getResources(), R.drawable.head1);
		Bitmap bitmap2 = BitmapFactory.decodeResource(getResources(), R.drawable.head2);
		meHeadIco.setImageBitmap(ImageUtil.getCircleBitmap(bitmap1));
		peerHeadIco.setImageBitmap(ImageUtil.getCircleBitmap(bitmap2));
		
		peerName.setText("Kettyu");
		myName.setText("Kevin");
	}
	
	@Override
	protected void onResume() {
		super.onResume();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.talk, menu);
		
		return true;
	}

}
